﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Microsoft.SharePoint;
using Microsoft.SharePoint.Linq;

namespace Probe
{

    public partial class Form1 : Form
    {

        public Form1()
        {
            InitializeComponent();
        }

        private void probeGetToolStripMenuItem_Click(object sender, EventArgs e)
        {

            using (DataContext data = new DataContext(@"http://sp.korablik.local/shops"))
            {


                //EntityList<BirthdaysAllItem> BirthdaysAll =
                //    data.GetList<BirthdaysAllItem>("BirthdaysAll");

                //var youngBirthdays = from Birthdays in BirthdaysAll
                //    select Birthdays;

                //foreach (var o in youngBirthdays)
                //{

                //}

                EntityList<Probe.PermDocs.ПервичныеДокументыDocumentSet> PermDocsAll =
                    data.GetList<Probe.PermDocs.ПервичныеДокументыDocumentSet>(@"Первичные документы");

                var allItems = from Items in PermDocsAll
                    where
                        //Items.Title == @"ЗП00622442(267854)"
                        Items.Id == 1
                    select Items;

                

                foreach (var o in allItems)
                {

                }

   
            }

        }

    }

}
